home *** CD-ROM | disk | FTP | other *** search
/ Aminet 1 (Walnut Creek) / Aminet - June 1993 [Walnut Creek].iso / aminet / util / edit / ced_programs.lha / CED-Programs / RightShift.ced < prev   
Text File  |  1993-02-14  |  763b  |  45 lines

  1. /*
  2.  * RightShift.ced
  3.  *
  4.  * Shift the current block to the right, according to tabsize setting.
  5.  *
  6.  * Author: Stefan Winterstein (winter@cs.uni-sb.de)
  7.  * Status: Public Domain
  8.  *
  9.  */
  10.  
  11. LF  = '0A'X
  12. TAB = '09'X
  13.  
  14. options results        /* Allow CygnusEd to pass status variables */
  15.  
  16. address 'rexx_ced'    /* Tell ARexx to talk to CygnusEd */
  17.  
  18. status 47            /* get current line number */
  19. start = result
  20.  
  21. status 69            /* get start of block */
  22.     end = result
  23.  
  24. if end = -1 then do    /* No block marked */
  25.     end = start+1    /* then work on current line */
  26. end
  27.  
  28. if start > end then do    /* swap start with end */
  29.     t = start
  30.     start = end
  31.     end = t
  32. end
  33.  
  34. 'jump to line' start+1    /* goto start of block */
  35.  
  36. do line = start while line < end
  37.     'beg of line'
  38.     'text' TAB
  39.     'down'
  40. end
  41.  
  42. 'beg of line'
  43.  
  44. exit
  45.